home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Documentation / develop / develop Issue 15 / develop 15 code / Managing Component Registration / LoaderPrivate.h < prev    next >
Encoding:
Text File  |  1993-06-02  |  2.3 KB  |  119 lines  |  [TEXT/KAHL]

  1. /*
  2.     File:        LoaderPrivate.h
  3.  
  4.     Contains:    Private header file for Loader component routines.
  5.  
  6.                 Refer to develop Issue 15, "Managing Component Registration",
  7.                 for details on this code.
  8.  
  9.     Written by:    Gary Woodcock
  10.  
  11.     Copyright:    © 1993 by Apple Computer, Inc.
  12.  
  13.     Change History (most recent first):
  14.  
  15. */
  16.  
  17. //-----------------------------------------------------------------------
  18. // Includes
  19.  
  20. #ifndef    _LOADERPRIVATE_
  21. #define    _LOADERPRIVATE_
  22.  
  23. #include "CompileFlags.h"
  24.  
  25. #include <Components.h>
  26.  
  27. //-----------------------------------------------------------------------
  28. // Private constants
  29.  
  30. #define kComponentLoadListResType    'thld'
  31.  
  32. // Base resource ID
  33. enum
  34. {
  35.     kLoaderBaseResID = 128
  36. };
  37.  
  38. // Maximum number of instances that can be opened
  39. enum
  40. {
  41.     kMaxLoaderInstances = 1
  42. };
  43.  
  44. // Component and interface revision levels
  45. enum
  46. {
  47.     loaderInterfaceRev = 0x00010001    
  48. };
  49.  
  50. enum
  51. {
  52.     kRegisterLocally = 0,
  53.     kRegisterGlobally = 1
  54. };
  55.  
  56. //-----------------------------------------------------------------------
  57. // Private types
  58.  
  59. typedef struct ComponentLoadSpec
  60. {
  61.     ResType    componentResType;
  62.     short    componentResID;
  63. }
  64. ComponentLoadSpec, *ComponentLoadSpecPtr, **ComponentLoadSpecHdl;
  65.  
  66. typedef struct ComponentLoadList
  67. {
  68.     short                count;
  69.     ComponentLoadSpec    spec[1];
  70. }
  71. ComponentLoadList, *ComponentLoadListPtr, **ComponentLoadListHdl;
  72.  
  73. typedef    struct LoaderPrivateGlobals
  74. {
  75.     Component    self;    // Component ID
  76. }
  77. LoaderPrivateGlobals, *LoaderPrivateGlobalsPtr, **LoaderPrivateGlobalsHdl;
  78.  
  79. //-----------------------------------------------------------------------
  80. // Private prototypes
  81.  
  82. #ifdef BUILD_LINKED
  83.  
  84. // Only need this prototype if we're running linked (for debugging)
  85. pascal ComponentResult
  86. LoaderDispatcher (ComponentParameters *params, Handle storage);
  87.                                          
  88. #endif BUILD_LINKED
  89.                                              
  90. pascal ComponentResult
  91. _LoaderOpen (Handle storage, ComponentInstance self);
  92.     
  93. pascal ComponentResult
  94. _LoaderClose (Handle storage, ComponentInstance self);
  95.  
  96. pascal ComponentResult
  97. _LoaderCanDo (short selector);
  98.  
  99. pascal ComponentResult
  100. _LoaderVersion (void);
  101.  
  102. pascal ComponentResult
  103. _LoaderRegister (Handle storage);
  104.  
  105. #ifdef THINK_C
  106. #ifdef BUILD_LINKED
  107.  
  108. Component
  109. RegisterLoader (void);
  110.  
  111. #endif BUILD_LINKED
  112. #endif THINK_C
  113.  
  114. //-----------------------------------------------------------------------
  115.  
  116. #endif _LOADERPRIVATE_
  117.  
  118. //-----------------------------------------------------------------------
  119.